﻿using UnityEngine;
using System.Collections;

public class GameMansger : MonoBehaviour {

	WWW www;
	void Start () {
	
		StartCoroutine(loadScene());
	}
	

	void Update () {
	

	}

	void OnGUI()
	{
		GUI.Label(new Rect(0,0,200,100),(www.progress*100).ToString()+" %");
		if(www.progress>=1)
		{
			Application.LoadLevel(1);
		}
	}

	IEnumerator loadScene()
	{
		www = new WWW(Application.dataPath+"/Scene/0.unity");
		yield return www;
	}
}
